Skip to content

Add text2vec-digitalocean vectorizer module - #431

Merged
mpartipilo merged 2 commits into
mainfrom
text2vec-digitalocean
May 22, 2026
Merged

Add text2vec-digitalocean vectorizer module#431
mpartipilo merged 2 commits into
mainfrom
text2vec-digitalocean

Conversation

@mpartipilo

@mpartipilo mpartipilo commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds support for the new text2vec-digitalocean vectorizer module
  • Mirrors text2vec-mistral (shared shape: model + baseURL + vectorizeClassName)
  • No changes to generated proto/gRPC files; existing serialization path reused unchanged
  • model is required on the factory — the server requires it, so the client surface enforces it at compile time

API surface added

  • Text2VecDigitalOceanConfig — runtime config type with model: string (required) and optional baseURL / vectorizeCollectionName (src/collections/config/types/vectorizer.ts)
  • Text2VecDigitalOceanConfigCreate — create-time alias (src/collections/configure/types/vectorizer.ts)
  • configure.vectors.text2VecDigitalOcean(opts) — factory, opts required (calling without it is a TS error since model must be supplied)
  • Legacy/wrapper entry also added so the existing namespace pattern stays consistent, with the same required-opts shape
  • 'text2vec-digitalocean' added to the Vectorizer union and both VectorizerConfigType / VectorizerConfigCreateType conditional maps

Test plan

  • Unit tests added in src/collections/configure/unit.test.ts:
    • should create the correct Text2VecDigitalOceanConfig type with only the required model — minimum-required-input case
    • should create the correct Text2VecDigitalOceanConfig type with all values — full-payload case asserting text2vec-digitalocean key with baseURL + model
  • All 128 unit tests pass (vitest run --project unit src/collections/configure/unit.test.ts)
  • tsc --noEmit clean across the entire project — no new type errors
  • Lint/format clean on changed files

Review-feedback changes

Second commit (c2fbd92) tightens model from optional to required, matching the Python sibling PR (weaviate/weaviate-python-client#2041) and the server contract.

Closes #430

Sibling PR (Python): weaviate/weaviate-python-client#2041

🤖 Generated with Claude Code

Adds support for the new text2vec-digitalocean vectorizer. The
module shape mirrors text2vec-mistral exactly (model + baseURL +
vectorizeClassName), so the existing serialization path is reused
unchanged.

Closes #430

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

The server requires `model` (e.g. `qwen3-embedding-0.6b`); the client
should require it too rather than silently sending a payload the
server will reject.

- `Text2VecDigitalOceanConfig.model` is now `string` (was `string?`).
- Both factory entries — the implementation in `legacyVectors` and
  the wrapper in the current `vectors` namespace — now require `opts`
  (was `opts?`). TypeScript will now flag missing `model` at the
  call site.
- Defaults test renamed to "with only the required model" and updated
  to pass `model`; the original "with defaults" assertion (that
  `config` is undefined when nothing is provided) is no longer
  reachable now that `model` is mandatory.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mpartipilo
mpartipilo marked this pull request as ready for review May 18, 2026 12:08
@mpartipilo
mpartipilo merged commit 7432188 into main May 22, 2026
13 checks passed
@mpartipilo
mpartipilo deleted the text2vec-digitalocean branch May 22, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for text2vec-digitalocean module

2 participants